
package com.jf.cloud.supplier.controller.platform;

import com.jf.cloud.common.response.ServerResponseEntity;
import com.jf.cloud.supplier.service.SupplierBankCardService;
import com.jf.cloud.supplier.vo.SupplierBankCardVO;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author zz
 * @Date 2021/4/26 10:09
 */
@RestController
@RequestMapping("/p/supplier_bank_card")
@Tag(name = "platform-供应商银行卡信息")
public class SupplierBankCardController {

    @Autowired
    private SupplierBankCardService supplierBankCardService;

    @GetMapping("/list_by_supplier_id")
    @Operation(summary = "根据供应商id批量获取银行卡信息")
    public ServerResponseEntity<List<SupplierBankCardVO>> listBySupplierId(@RequestParam(value = "supplierId") Long supplierId) {
        List<SupplierBankCardVO> supplierBankCardVOList = supplierBankCardService.listBySupplierId(supplierId);
        return ServerResponseEntity.success(supplierBankCardVOList);
    }

}
